package com.example.a828502.sqliteimporttest;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by 828502 on 2016/4/20.
 */

public class CityBean implements Parcelable {


    public Integer id;


    public String country_code;


    public String dist_cn_name;


    public String dist_code;


    public String parent_dist_code;


    public String type_code;

    public String province_code;


    public CityBean() {
    }

    protected CityBean(Parcel in) {
        this.id = (Integer) in.readValue(Integer.class.getClassLoader());
        this.country_code = in.readString();
        this.dist_cn_name = in.readString();
        this.dist_code = in.readString();
        this.parent_dist_code = in.readString();
        this.type_code = in.readString();
        this.province_code = in.readString();
    }

    public static final Creator<CityBean> CREATOR = new Creator<CityBean>() {
        @Override
        public CityBean createFromParcel(Parcel in) {
            return new CityBean(in);
        }

        @Override
        public CityBean[] newArray(int size) {
            return new CityBean[size];
        }
    };

    public CityBean(String ella, String s) {

        this.dist_cn_name =ella;
        this.dist_code = s;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeValue(this.id);
        dest.writeString(this.country_code);
        dest.writeString(this.dist_cn_name);
        dest.writeString(this.dist_code);
        dest.writeString(this.parent_dist_code);
        dest.writeString(this.type_code);
        dest.writeString(this.province_code);

    }

    @Override
    public String toString() {
        return "CityDictBean{" +
                "id=" + id +
                ", country_code='" + country_code + '\'' +
                ", dist_cn_name='" + dist_cn_name + '\'' +
                ", dist_code='" + dist_code + '\'' +
                ", parent_dist_code='" + parent_dist_code + '\'' +
                ", type_code='" + type_code + '\'' +
                ", province_code='" + province_code + '\'' +
                '}';
    }
}
